﻿using UnitTests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace Course.Test
{
    [TestClass]
    public class StudentTest
    {

        private TestContext testContextInstance;

        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }
        [TestMethod]
        public void StudentConstructorTestCorrectInput()
        {
            int facNumber = 22222;
            string name = "kr";
            Student target = new Student(facNumber, name);
            Assert.AreEqual(facNumber, target.FacNumber, "invalid fac number");
            Assert.AreEqual(name, target.Name, "invalid name");
        }
        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void EmptyNameTest()
        {
            int facNumber = 22222;
            string name = string.Empty;
            Student target = new Student(facNumber, name);
        }

        [TestMethod]
        [ExpectedException(typeof(ArgumentException))]
        public void InvalidFacNumberTest()
        {
            int facNumber = 2222;
            string name = "sda";
            Student target = new Student(facNumber, name);
        }
    }
}
